#@layout()
#define main()
<div class="layui-col-md3">
    <div class="layui-card">
        <div class="layui-card-header">院系管理</div>
        <div class="layui-card-body">
            <div class="layui-field-box">
                <div class="layui-row layui-col-space10">
                    <div class="layui-col-md12">
                        <blockquote class="layui-elem-quote layui-quote-nm layui-quote-warn">温馨提示：鼠标点击右键即可进行菜单管理</blockquote>
                        <ul id="treeDemo" class="ztree fsTree" method="get" isRoot="1" url="#(base)/class/getFuClassList" clickCallbackId="fsDatagrid" clickCallbackInputs="menuId:$id" treeIdKey="id" treePIdKey="pId" treeName="name" ></ul>

                        <div class="fsTreeRightMenu">
                            <p function="refresh" icon="refresh" name="刷新"></p>
                            #if(roletool.isPower(session.usersession.role_id, 20))
                            <p function="top" icon="add" name="新增" fs:authorize="" topUrl="#(base)/class/showAddFuClass" topWidth="700px" topHeight="460px" topTitle="新增菜单信息" inputs="parentId:$id"></p>
                            #end
                            #if(roletool.isPower(session.usersession.role_id, 21))
                            <p function="top" icon="edit" name="编辑" fs:authorize="" topUrl="#(base)/class/showEditFuClass" topWidth="700px" topHeight="460px" topTitle="编辑菜单信息" inputs="menuId:$id" disabledType="rootNode"></p>
                            #end
                            #if(roletool.isPower(session.usersession.role_id, 22))
                            <p function="submit" icon="del" name="删除" fs:authorize="" method="get"  url="#(base)/class/removeFuClass" isConfirm="1" confirmMsg="是否确定删除？" inputs="menuId:$id" disabledType="parent|rootNode"></p>
                            #end
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="layui-col-md9">
    <div class="layui-card">
        <div class="layui-card-header"><i title="点击收缩" class="layui-icon layui-icon-shrink-right fsShrink" clickEventElem="#refresh"></i> 班级</div>
        <div class="layui-card-body">
            <div id="table_buttion_div">
                <form id="query_form" style="display: none;">
                    <input type="text" id="menuId" name="menuId" value="0"/>
                </form>
                #if(roletool.isPower(session.usersession.role_id, 23))
                <button class="layui-btn layui-btn-sm layui-btn-blue" function="top" topUrl="#(base)/class/showAddClass" selectTreeId="menuId" topWidth="700px" topHeight="350px" topTitle="新增班级信息" inputs="menuId:#menuId">
                    <i class="layui-icon">&#xe654;</i>新增
                </button>
                #end
                <button class="layui-btn layui-btn-sm layui-btn-blue" function="refresh"  id="refresh" selectTreeId="menuId">
                    <i class="layui-icon">&#xe666;</i>刷新
                </button>
            </div>

            <table id="fsDatagrid" class="fsDatagrid" lay-filter="fsDatagrid" url="#(base)/class/getClassPage" isLoad="0" isPage="1" defaultForm="query_form" height="full-130">
            </table>

            <div class="fsDatagridCols">
                <p type="numbers" title="序号"/>
                <p field="id" title="ID" />
                <p field="class_name" title="班级名称" />
                <p field="major" title="专业名称" />
                <p field="teacher" title="辅导员" />
                <p field="schoolsystem" title="学制" />
                <!-- <p field="username" title="创建人" />
                <p field="createtime" title="创建时间" /> -->
                <p fixed="right" align="center" toolbar="#barDemo" title="操作" />
            </div>

            <script type="text/html" id="barDemo">
				#if(roletool.isPower(session.usersession.role_id, 32))
				<a id="edit" class="layui-btn layui-btn-xs layui-btn-blue" lay-event="top" topUrl="#(base)/class/showSetUpCourse" topWidth="700px" topHeight="350px" isSelect="1" topTitle="设置课程" inputs="id:">设置课程</a>
                #end
				#if(roletool.isPower(session.usersession.role_id, 24))
                <a id="edit" class="layui-btn layui-btn-xs layui-btn-blue" lay-event="top" topUrl="#(base)/class/showEditClass" topWidth="700px" topHeight="350px" isSelect="1" topTitle="编辑班级信息" inputs="id:">编辑</a>
                #end
                #if(roletool.isPower(session.usersession.role_id, 25))
                <a id="del" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="submit" isConfirm="1" url="#(base)/class/removeClass" inputs="id:">删除</a>
                #end
            </script>
        </div>
    </div>
</div>
#end